home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
program
/
ddj0897.zip
/
DYN401.ZIP
/
examples
/
exam07
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-27
|
1KB
|
84 lines
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/
#include "generics.h"
main(int argc, char *argv[])
{
object strDict, seq, strAss;
InitDynace(&argc);
/* Create, initialize and print an instance of StringDictionary */
strDict = gNewWithInt(StringDictionary, 49);
gAddStr(strDict, "Key 1", gNewWithStr(String, "The first value added."));
gAddStr(strDict, "Other key", gNewWithDouble(DoubleFloat, 3.14159));
gAddStr(strDict, "abcd", gNewWithLong(LongInteger, 186282L));
gPrint(strDict, stdoutStream);
/* Create an instance of SetSequence (seq = gSequence()) and
sequence through the StringAssociations (strAss) in the
StringDictionary (strDict) printing the value associated
with each. */
for (seq = gSequence(strDict) ; strAss = gNext(seq) ; )
gPrint(gValue(strAss), stdoutStream);
gDeepDispose(strDict);
return 0;
}
/*
*
* This source code is CONFIDENTIAL and
* PROPRIETARY to Algorithms Corporation. Unauthorized
* distribution, adaptation or use may
* be subject to civil and criminal penalties.
*
* Copyright (c) 1993 Algorithms Corporation
* 3020 Liberty Hills Drive
* Franklin, TN 37064
*
* ALL RIGHTS RESERVED.
*
*
*
*/